#ifndef _SETTINGS_H_
#define _SETTINGS_H_
#include "Defs.h"


typedef struct _Setting
{
	// Params for specific robot
	int version;
	String name;
	int servoCnt;
	int16_t offsetMin;
	int16_t offsetMax;
	int mute;
	int volume;
	String apIp;
	String apPwd;
	int apPort;

	// Params for runtime
	uint8_t idx;
	uint16_t angle;
	uint16_t angles[AE_SERVO_MAX];
	uint32_t timeMsec;
	uint32_t lckTimeMsec;

	// Params for playing/teaching
	AeState_t state;
	String action;
	uint32_t seqCnt;
	uint32_t nextSeq;
	uint32_t servoMsec;
	uint32_t waitMsec;
	uint32_t startMsec;
  uint16_t lastAngles[AE_SERVO_MAX];
} Setting_t;


/**
* @brief:
* Software settings
*/
class CSettings
{
public:
	CSettings();
	~CSettings();

	bool Load();
	bool Save();
	void Reset();

public:
	Setting_t m_set;
};


#endif
